import request from '@/utils/request'

// 查询岗位列表
export function listPost(query) {
  return request({
    url: '/reserve/setmeal/list',
    method: 'get',
    params: query
  })
}


// 查询单个
export function getPost(id) {
  return request({
    url: '/reserve/setmeal/' + id,
    method: 'get'
  })
}


// 新增岗位
export function addPost(data) {
  return request({
    url: '/reserve/setmeal',
    method: 'post',
    data: data
  })
}

// 修改信息
export function updatePost(data) {
  return request({
    url: '/reserve/setmeal/updateItem',
    method: 'post',
    data: data
  })
}


// 删除岗位
export function delItems(itemsIds) {
  return request({
    url: '/reserve/setmeal/' + itemsIds,
    method: 'delete'
  })
}

// 删除套餐中的检查组
export function deleteSetMeal(data) {
  return request({
    url:'/reserve/setmeal/deleteSetMeal',
    method: 'post',
    data: data
  })
}

// 获取可以被套餐添加进去的检查组
export function getInfoBySetMeal(query) {
  return request({
    url:'/reserve/setmeal/getInfoBySetMeal',
    method: 'get',
    params: query
  })
}

// 新增套餐中的检查组
export function addSetMealGroups(data) {
  return request({
    url:'/reserve/setmeal/addSetMealGroups',
    method: 'post',
    data: data
  })
}
